-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require sb3 version 2 or newer #148
Conversation
Our environment will not work with older sb3 versions, due to using gymnasium (where older sb3 versions used gym).
This may fix the related error in tests. However, it will now install rllib separately from what is set in .[rllib].
@@ -77,7 +77,7 @@ jobs: | |||
- name: Clean up dependencies | |||
run: | | |||
pip uninstall -y stable-baselines3 gymnasium | |||
pip install .[rllib] | |||
pip install ray[rllib] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rllib requires gymnasium==0.26.3 which I why we install our .[rllib] deps, see:
Line 50 in 00ddb9e
rllib = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM apart from the question about rllib deps
It seems that older Ray is installed on the tests that pass, so by specifying the gymnasium version we could be enforcing older Ray (which works with our config) to be installed. On the newer version of Ray, I also locally had some issues unless I try a different path format. Even outside of the path issue, I also had some issues with one of my environments with both Ray versions, something about the format of observations, but I didn't test it in-depth, so I don't know the issue was related to my Godot environment (which worked with SB3 which I mostly use for now), or something else. I'll add the gymnasium version as a quick temporary fix, if it works, we can merge the PR for now since it's focused on ensuring the correct SB3 version, and in the future we can test our Ray configuration and see if something needs to be updated. Edit: Still newer gymnasium with ray-2.7.0 is being installed, I'll have to look into this a bit more later. |
With this approach, newer Ray 2.7 seems to work, although I didn't perform much testing to see if everything works with this as before. As a quick fix I've changed the folder path to an absolute path as that seems to fix the error. An alternative could be to use older Ray or find a different fix for the issue. It should be noted that one of my environments didn't work with rllib (some observation type error), but I think that holds for both Ray versions, and may need more troubleshooting at some future point as I'm not sure about the cause yet (maybe something with the env itself even though it works with SB3). Jumperhard worked on my PC as well, but there might be some difference in observations from my env (which has some floats and a raycast obs array). For future reference and in case similar errors appear in the future, the error was:
|
Our environment will not work with older sb3 versions, due to using gymnasium (where older sb3 versions used gym).
Edit: This may cause an issue with rllib, I will check the test results and see if it can be addressed if it does.